import Vue from 'vue'
import router from './router/index';
import App from './App.vue'
import './assets/css/global.css'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import axios from 'axios'
import TreeTable from 'vue-table-with-tree-grid'
Vue.config.productionTip = false
Vue.prototype.$http = axios;
axios.defaults.baseURL = 'http://127.0.0.1:8888/api/private/v1/'
axios.interceptors.request.use(config=>{
  config.headers.Authorization = window.sessionStorage.getItem('token')
  return config;
})
Vue.component('tree-table',TreeTable);
Vue.use(ElementUI);
 /*eslint-disable no-new */
 new Vue({
   el:"#app",
  router,
   render:h =>h(App)
 })
